﻿using Shop.RemoteModel;
using Shop.RemoteModel.Goods.Model;
using SqlSugar;

namespace Shop.Model.DB
{
    [SugarTable("Goods_Info")]
    public class DBGoods
    {
        [SugarColumn(IsPrimaryKey = true)]
        public long Id { get; set; }
        /// <summary>
        /// 商品名
        /// </summary>
        public string GoodsName { get; set; }
        /// <summary>
        /// Spu
        /// </summary>
        public string GoodsSpu { get; set; }

        /// <summary>
        /// 主类目ID
        /// </summary>
        public long MainCategoryId { get; set; }

        /// <summary>
        /// 二级类目ID
        /// </summary>
        public long TwoCategoryId { get; set; }
        /// <summary>
        /// 三级类目ID
        /// </summary>
        public long ThreeCategoryId { get; set; }
        /// <summary>
        /// 类目ID
        /// </summary>
        public long CategoryId { get; set; }
        /// <summary>
        /// 主图
        /// </summary>
        public string MainImg { get; set; }

        /// <summary>
        /// 售价(取规格中的最低价格)
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 品牌名
        /// </summary>
        public string BrandName { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public GoodsStatus Status { get; set; }

        /// <summary>
        /// 拥有的SKU数量
        /// </summary>
        public short SkuNum { get; set; }

        /// <summary>
        /// 评论数
        /// </summary>
        public int CommentNum { get; set; }
        
        /// <summary>
        /// 销售数
        /// </summary>
        public int SaleNum {  get; set; }
        /// <summary>
        /// 应用的物流ID
        /// </summary>
        public long? LogisticsId { get; set; }
        /// <summary>
        /// 是否为虚拟商品
        /// </summary>
        public bool IsVirtual { get; set; }

        /// <summary>
        /// 服务说明
        /// </summary>
        [SugarColumn(IsJson = true)]
        public GoodsServeShow[] ServerShow { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDrop { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime? PublicTime { get; set; }
        /// <summary>
        /// 下架时间
        /// </summary>
        public DateTime? OffShelfTime { get; set; }
        /// <summary>
        /// 版本号
        /// </summary>
        public long Ver { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }
    }
}
